<?php

namespace Tictactoe\Ai\Population;

use Tictactoe\Game as Game;

class Item {
    /**
     * @var Game
     */
    protected $game = null;
    
    /**
     * @var array
     */
    protected $move = array();
    
    /**
     * @var int
     */
    protected $forValue = 0;
    
    /**
     * @var int 
     */
    protected $estimate = 0;
    
    /**
     * @var string
     */
    protected $info = '';
    
    /**
     * 
     * @param Game $game
     * @param int $x
     * @param int $y
     * @param int $forValue
     */
    public function __construct(Game $game, $x, $y, $forValue, $estimate) {
        $this->game = $game;
        $this->move = array('x'=>$x, 'y'=>$y);
        $this->forValue = $forValue;
        $this->estimate = $estimate;
    }


    /**
     * @return Game
     */
    public function getGame() {
        return $this->game;
    }

    /**
     * @return array
     */
    public function getMove() {
        return $this->move;
    }

    /**
     * @return int
     */
    public function getForValue() {
        return $this->forValue;
    }

    /**
     * @return int
     */
    public function getEstimate() {
        return $this->estimate;
    }
    
    public function setGame(Game $game) {
        $this->game = $game;
    }

    public function setMove($move) {
        $this->move = $move;
    }

    public function setForValue($forValue) {
        $this->forValue = $forValue;
    }

    public function setEstimate($estimate) {
        $this->estimate = $estimate;
    }

    public function getInfo() {
        return $this->info;
    }

    public function setInfo($info) {
        $this->info = $info;
    }
}
